package com.zj.aopspringboot01;

import org.springframework.stereotype.Service;

@Service
public class UserService {
    //增加增删查改方法，输出增删查改

    public int add(int a,int b) {

        System.out.println("add");
        int c=1/0;
        return a+b;
    }
    public void delete(int id) {
        System.out.println("delete");
    }
    public int update(User user) {
        System.out.println("update");
        return 1;
    }
    public User select(int id) {
        System.out.println("select");
        int a=1/0;
        return new User("zhangsan",id,"女");
    }


    public int addUser(User user) {
        System.out.println("addUser");
        return 1;
    }

    public void ping(){
        System.out.println("ping");
    }
}
